package cn.xsirl.websocket.message;

/**
 * @version V1.0
 * @Title:
 * @ClassName: $PackageName$.$ClassName$.java
 * @Description:
 * @author: 谢明珑
 * @date: 2021/5/27$ 21:42$
 */
public class ComponentMessage {
    private short id;
    private byte type;
    private byte[] content;
    
    public ComponentMessage(short id, byte type, byte[] content) {
        this.id = id;
        this.type = type;
        this.content = content;
    }
    
    public short getId() {
        return id;
    }
    
    public void setId(short id) {
        this.id = id;
    }
    
    public byte getType() {
        return type;
    }
    
    public void setType(byte type) {
        this.type = type;
    }
    
    public byte[] getContent() {
        return content;
    }
    
    public void setContent(byte[] content) {
        this.content = content;
    }
    
    public boolean isEmpty() {
        return this.content.length == 0;
    }
}
